<template>
	<view class="content">
		<web-view :webview-styles="webviewStyles" :src="src"></web-view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				webviewStyles:{
					progress: {
						color: '#0DA297'
					}
				},
				src:'',
				
			}
		},
		onShareAppMessage: function () {
		},
		onLoad(options){
			let  selfurl = uni.getStorageSync('selfurl');
			
			if(options.special && options.special==1){
				let src=uni.getStorageSync('specialUrl');
				this.src=JSON.parse(decodeURIComponent(src));
			}else if(options.url){
					let src=JSON.parse(decodeURIComponent(options.url))
					if(src.includes('?')){
						
					   src = src+'&Uid='+uni.getStorageSync('userId');
					}else{
						src = src+'?Uid='+uni.getStorageSync('userId');
					}	
					this.src=src;
			};
		
		},
		onUnload() {
			//清除缓存
			if(uni.getStorageSync('flow'))uni.removeStorageSync('flow');
			
		}
	}
</script>